Back to Main Menu

Remote Access - Remote Desktop RDP

Remote Desktop RDP

When myData is installed on a Remote Desktop (Microsoft Terminal Services) environment and published as an RDP application it is often necessary to pass myData launch parameters through the RDP launch file in order to provide a meaningful user experience.

 

Typically parameters are passed to myData to allow myData to start and then automatically load a particular asset.

 

By default, the myData application installer registers the myData application to be the protocol handler (to handle any URL style integration). 

 

Using Parameters with Remote Desktop Published Applications

The RDP file can be used to pass parameters to the remote instance of myData.

 

The parameter is defined when the RDP file is first created, however it is possible to change this parameter in the file without needing to republish the RDP file via the server.

 

Typically the RDP file will have a desktop icon or menu shortcut allowing the user to click on the shortcut and open myData.

 

This file would not usually have any parameters set.

 

When another application attempts to launch MyData and pass through parameters (such as the asset record to load) the RDP file will need to be altered to set the desired parameters.

 

It is best to make a copy of the RDP file and alter the parameters in the copy so that the base RDP file always opens with no parameters set.

 

Remote Desktop Prerequisites

An RDP file is created via "TS RemoteApp Manager".

 

This management tool is part of the Terminal Services suite of tools.

 

The properties of the published MyData program will need to have the following configuration:

  • The installation of MyData on the server must have the MyData Protocol Handler registry setting.  This setting is usually created when MyData is installed and should not be removed or modified.
  • Select "Allow any command-line arguments" in the command-line arguments configuration
    • This is necessary to allow the parameters to change. For example, to launch MyData from another application and have MyData automatically load an asset requires the Asset ID to be passed to MyData. Each time a new asset is passed to MyData the parameter is different, hence the parameter cannot be a fixed value
    • The command line arguments are not run on the server, they are simply passed to MyData, which only accepts specific commands, hence there is limited scope for passing malicious command line arguments 
  • Do not create the file with a Digital Signature
    • A signed file cannot be altered to have different parameters

MyData Protocol Handler

In a desktop environment where both MyData and another application are both running locally on the desktop, the MyData protocol handler is used by the other application to launch MyData and pass in parameters.

 

When MyData is a published RDP application the standard implementation of the protocol handler will not be able to interact with the published application.

 

The MyData.RdpBridge.exe is a console application that allows MyData to be launched by 3rd party application when MyData has been deployed as a published application via an RDP file. This file is required for each desktop that will need to use 3rd party launching.

 

MyData.RdpBridge

The executable file MyData.RdpBridge allows a published MyData application to be launched via a 3rd party application without the need for the 3rd party application to change how it currently launches MyData.

 

In other words, the usage of the protocol handler is unchanged.

 

In order to achieve this the registry setting for the protocol handler needs to be altered/created on each desktop that requires this feature. 

  • Using Parameters with Remote Desktop Published Applications
  • Remote Desktop Prerequisites
  • MyData Protocol Handler
  • MyData.RdpBridge
  • Testing
  • Update Registry

Testing

MyData.RdpBridge.exe can be run from the command line, bypassing the protocol handler.

It expects 3 arguments:

  1. The name of the RDP file that is used to launch MyData. If the RDP file is not in the same directory as MyData.RdpBridge.exe then the full path to the RDP file must be included
  2. The RDP file should contain a line starting with "remoteapplicationcmdline:s:". This is the line in an RDP file that is used to pass parameters to the remote application. This is passed into MyData.RdpBridge to allow flexibility in case this line has been customized.
  3. The parameter to pass to MyData. This is the parameter string normally used to launch MyData when installed locally on the machine. e.g."mydata:action=goto&assetCategory=Bridges&assetID=BR119"

 

Command Line Example:

"C:\Program Files(x86)\Assetic MyData\MyData.RdpBridge.exe" "c:\users\sammy\desktop\MyData Remote.rdp" "remoteapplicationcmdline:s:" "mydata:action=goto&assetCategory=Bridges&assetID=BR119"

Update Registry

Once MyData.RdpBridge.exe has been successfully tested via the command line the next step is to alter the registry setting originally created by the myData local installation. If MyData has not previously been created it is necessary to create this setting.

 

The registry setting is "HKEY_CLASSES_ROOT\myData\shell\open\command", the value to use is the same as the command as in the test batch file, except the last parameter is "%1" rather than the MyData launch parameter:

 

Registry Example Value:

"C:\Program Files(x86)\Assetic MyData\MyData.RdpBridge.exe" "c:\users\sammy\desktop\MyData Remote.rdp" "remoteapplicationcmdline:s:" "%1"

By altering this registry setting there is no need to change any existing 3rd party integration that is already configured to launch MyData.